<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Os1: /home/alejandro/Desarrollo eclipse/os1/Thirdparty/DBoW2/DUtils/Random.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Os1
   &#160;<span id="projectnumber">1</span>
   </div>
   <div id="projectbrief">OrbSlam2 documentado y modificado</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,'Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_random_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Random.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_random_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*  </span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * File: Random.h</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Project: DUtils library</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Author: Dorian Galvez-Lopez</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Date: April 2010, November 2011</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Description: manages pseudo-random numbers</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * License: see the LICENSE.txt file</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifndef __D_RANDOM__</span></div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="_random_8h.html#a32b388b36f2ecf45e30c994ead90dd4c">   13</a></span>&#160;<span class="preprocessor">#define __D_RANDOM__</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;cstdlib&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="namespace_d_utils.html">   18</a></span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_d_utils.html">DUtils</a> {</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="class_d_utils_1_1_random.html">   21</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_d_utils_1_1_random.html">Random</a></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;{</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;  <span class="keyword">class </span><a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">UnrepeatedRandomizer</a>;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;  </div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_d_utils_1_1_random.html#a719a6489316343a771e062f0be58050f">SeedRand</a>();</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    </div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_d_utils_1_1_random.html#a168e77d82ce1e66c6759e97ef27adbbc">SeedRandOnce</a>();</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_d_utils_1_1_random.html#a719a6489316343a771e062f0be58050f">SeedRand</a>(<span class="keywordtype">int</span> seed);</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_d_utils_1_1_random.html#a168e77d82ce1e66c6759e97ef27adbbc">SeedRandOnce</a>(<span class="keywordtype">int</span> seed);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;</div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="class_d_utils_1_1_random.html#ac5d2e4d977afdec30071c531a7a96d88">   56</a></span>&#160;    <span class="keyword">static</span> T <a class="code" href="class_d_utils_1_1_random.html#ac5d2e4d977afdec30071c531a7a96d88">RandomValue</a>(){</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordflow">return</span> (T)rand()/(T)RAND_MAX;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    }</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="class_d_utils_1_1_random.html#a13760f5d6d4b866fbcc350dbb0d39d02">   67</a></span>&#160;    <span class="keyword">static</span> T <a class="code" href="class_d_utils_1_1_random.html#a13760f5d6d4b866fbcc350dbb0d39d02">RandomValue</a>(T min, T max){</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keywordflow">return</span> Random::RandomValue&lt;T&gt;() * (max - min) + min;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    }</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="class_d_utils_1_1_random.html#aa25012101ecbca54025d5430bcf93d86">RandomInt</a>(<span class="keywordtype">int</span> min, <span class="keywordtype">int</span> max);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    </div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="class_d_utils_1_1_random.html#a2c769bcd60a08fc3eba3ef4abf9761d5">   85</a></span>&#160;    <span class="keyword">static</span> T <a class="code" href="class_d_utils_1_1_random.html#a2c769bcd60a08fc3eba3ef4abf9761d5">RandomGaussianValue</a>(T mean, T sigma)</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    {</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="comment">// Box-Muller transformation</span></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    T x1, x2, w, y1;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordflow">do</span> {</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;      x1 = (T)2. * RandomValue&lt;T&gt;() - (T)1.;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;      x2 = (T)2. * RandomValue&lt;T&gt;() - (T)1.;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;      w = x1 * x1 + x2 * x2;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    } <span class="keywordflow">while</span> ( w &gt;= (T)1. || w == (T)0. );</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    w = sqrt( ((T)-2.0 * log( w ) ) / w );</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    y1 = x1 * w;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="keywordflow">return</span>( mean + y1 * sigma );</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    }</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="class_d_utils_1_1_random.html#af24ca62703bbf7428a4ea7787144bfb9">  105</a></span>&#160;  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="class_d_utils_1_1_random.html#af24ca62703bbf7428a4ea7787144bfb9">m_already_seeded</a>;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  </div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;};</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="comment">// ---------------------------------------------------------------------------</span></div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">  112</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">Random::UnrepeatedRandomizer</a></div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;{</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;  <a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">UnrepeatedRandomizer</a>(<span class="keywordtype">int</span> min, <span class="keywordtype">int</span> max);</div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a8d523a848ff349c73da7499167c2c637">  122</a></span>&#160;  <a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a8d523a848ff349c73da7499167c2c637">~UnrepeatedRandomizer</a>(){}</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  </div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  <a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">UnrepeatedRandomizer</a>(<span class="keyword">const</span> <a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">UnrepeatedRandomizer</a>&amp; rnd);</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  </div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  <a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">UnrepeatedRandomizer</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">UnrepeatedRandomizer</a>&amp; rnd);</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  </div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;  <span class="keywordtype">int</span> <span class="keyword">get</span>();</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;  </div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a4f93a3ab99e3e801d0c1d2599917a37a">  149</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a4f93a3ab99e3e801d0c1d2599917a37a">empty</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_values.empty(); }</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;  </div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a8ba0925ac2e14881505a9575466ddc4f">  155</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a8ba0925ac2e14881505a9575466ddc4f">left</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_values.size(); }</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  </div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  <span class="keywordtype">void</span> reset();</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;  </div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;  <span class="keywordtype">void</span> createValues();</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a7b59cc2afb7d7db20aa048ea95365134">  172</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a7b59cc2afb7d7db20aa048ea95365134">m_min</a>;</div><div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a5c2d23ba34589d23ac131e37feac6f6b">  174</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a5c2d23ba34589d23ac131e37feac6f6b">m_max</a>;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#adbe23146bfc61994e361d356282ce6c4">  177</a></span>&#160;  std::vector&lt;int&gt; <a class="code" href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#adbe23146bfc61994e361d356282ce6c4">m_values</a>;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;};</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;}</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="ttc" id="class_d_utils_1_1_random_html"><div class="ttname"><a href="class_d_utils_1_1_random.html">DUtils::Random</a></div><div class="ttdoc">Functions to generate pseudo-random numbers. </div><div class="ttdef"><b>Definition:</b> Random.h:21</div></div>
<div class="ttc" id="class_d_utils_1_1_random_1_1_unrepeated_randomizer_html_adbe23146bfc61994e361d356282ce6c4"><div class="ttname"><a href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#adbe23146bfc61994e361d356282ce6c4">DUtils::Random::UnrepeatedRandomizer::m_values</a></div><div class="ttdeci">std::vector&lt; int &gt; m_values</div><div class="ttdoc">Available values. </div><div class="ttdef"><b>Definition:</b> Random.h:177</div></div>
<div class="ttc" id="class_d_utils_1_1_random_1_1_unrepeated_randomizer_html"><div class="ttname"><a href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html">DUtils::Random::UnrepeatedRandomizer</a></div><div class="ttdoc">Provides pseudo-random numbers with no repetitions. </div><div class="ttdef"><b>Definition:</b> Random.h:112</div></div>
<div class="ttc" id="class_d_utils_1_1_random_html_af24ca62703bbf7428a4ea7787144bfb9"><div class="ttname"><a href="class_d_utils_1_1_random.html#af24ca62703bbf7428a4ea7787144bfb9">DUtils::Random::m_already_seeded</a></div><div class="ttdeci">static bool m_already_seeded</div><div class="ttdoc">If SeedRandOnce() or SeedRandOnce(int) have already been called. </div><div class="ttdef"><b>Definition:</b> Random.h:105</div></div>
<div class="ttc" id="class_d_utils_1_1_random_html_a2c769bcd60a08fc3eba3ef4abf9761d5"><div class="ttname"><a href="class_d_utils_1_1_random.html#a2c769bcd60a08fc3eba3ef4abf9761d5">DUtils::Random::RandomGaussianValue</a></div><div class="ttdeci">static T RandomGaussianValue(T mean, T sigma)</div><div class="ttdoc">Returns a random number from a gaussian distribution. </div><div class="ttdef"><b>Definition:</b> Random.h:85</div></div>
<div class="ttc" id="class_d_utils_1_1_random_1_1_unrepeated_randomizer_html_a4f93a3ab99e3e801d0c1d2599917a37a"><div class="ttname"><a href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a4f93a3ab99e3e801d0c1d2599917a37a">DUtils::Random::UnrepeatedRandomizer::empty</a></div><div class="ttdeci">bool empty() const</div><div class="ttdoc">Returns whether all the possible values between min and max were already given. </div><div class="ttdef"><b>Definition:</b> Random.h:149</div></div>
<div class="ttc" id="class_d_utils_1_1_random_1_1_unrepeated_randomizer_html_a7b59cc2afb7d7db20aa048ea95365134"><div class="ttname"><a href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a7b59cc2afb7d7db20aa048ea95365134">DUtils::Random::UnrepeatedRandomizer::m_min</a></div><div class="ttdeci">int m_min</div><div class="ttdoc">Min of range of values. </div><div class="ttdef"><b>Definition:</b> Random.h:172</div></div>
<div class="ttc" id="class_d_utils_1_1_random_html_a13760f5d6d4b866fbcc350dbb0d39d02"><div class="ttname"><a href="class_d_utils_1_1_random.html#a13760f5d6d4b866fbcc350dbb0d39d02">DUtils::Random::RandomValue</a></div><div class="ttdeci">static T RandomValue(T min, T max)</div><div class="ttdoc">Returns a random number in the range [min..max]. </div><div class="ttdef"><b>Definition:</b> Random.h:67</div></div>
<div class="ttc" id="class_d_utils_1_1_random_html_ac5d2e4d977afdec30071c531a7a96d88"><div class="ttname"><a href="class_d_utils_1_1_random.html#ac5d2e4d977afdec30071c531a7a96d88">DUtils::Random::RandomValue</a></div><div class="ttdeci">static T RandomValue()</div><div class="ttdoc">Returns a random number in the range [0..1]. </div><div class="ttdef"><b>Definition:</b> Random.h:56</div></div>
<div class="ttc" id="class_d_utils_1_1_random_html_a719a6489316343a771e062f0be58050f"><div class="ttname"><a href="class_d_utils_1_1_random.html#a719a6489316343a771e062f0be58050f">DUtils::Random::SeedRand</a></div><div class="ttdeci">static void SeedRand()</div><div class="ttdoc">Sets the random number seed to the current time. </div><div class="ttdef"><b>Definition:</b> Random.cpp:18</div></div>
<div class="ttc" id="class_d_utils_1_1_random_html_aa25012101ecbca54025d5430bcf93d86"><div class="ttname"><a href="class_d_utils_1_1_random.html#aa25012101ecbca54025d5430bcf93d86">DUtils::Random::RandomInt</a></div><div class="ttdeci">static int RandomInt(int min, int max)</div><div class="ttdoc">Returns a random int in the range [min..max]. </div><div class="ttdef"><b>Definition:</b> Random.cpp:47</div></div>
<div class="ttc" id="class_d_utils_1_1_random_html_a168e77d82ce1e66c6759e97ef27adbbc"><div class="ttname"><a href="class_d_utils_1_1_random.html#a168e77d82ce1e66c6759e97ef27adbbc">DUtils::Random::SeedRandOnce</a></div><div class="ttdeci">static void SeedRandOnce()</div><div class="ttdoc">Sets the random number seed to the current time only the first time this function is called...</div><div class="ttdef"><b>Definition:</b> Random.cpp:24</div></div>
<div class="ttc" id="namespace_d_utils_html"><div class="ttname"><a href="namespace_d_utils.html">DUtils</a></div><div class="ttdef"><b>Definition:</b> Random.h:18</div></div>
<div class="ttc" id="class_d_utils_1_1_random_1_1_unrepeated_randomizer_html_a8ba0925ac2e14881505a9575466ddc4f"><div class="ttname"><a href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a8ba0925ac2e14881505a9575466ddc4f">DUtils::Random::UnrepeatedRandomizer::left</a></div><div class="ttdeci">unsigned int left() const</div><div class="ttdoc">Returns the number of values still to be returned. </div><div class="ttdef"><b>Definition:</b> Random.h:155</div></div>
<div class="ttc" id="class_d_utils_1_1_random_1_1_unrepeated_randomizer_html_a8d523a848ff349c73da7499167c2c637"><div class="ttname"><a href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a8d523a848ff349c73da7499167c2c637">DUtils::Random::UnrepeatedRandomizer::~UnrepeatedRandomizer</a></div><div class="ttdeci">~UnrepeatedRandomizer()</div><div class="ttdef"><b>Definition:</b> Random.h:122</div></div>
<div class="ttc" id="class_d_utils_1_1_random_1_1_unrepeated_randomizer_html_a5c2d23ba34589d23ac131e37feac6f6b"><div class="ttname"><a href="class_d_utils_1_1_random_1_1_unrepeated_randomizer.html#a5c2d23ba34589d23ac131e37feac6f6b">DUtils::Random::UnrepeatedRandomizer::m_max</a></div><div class="ttdeci">int m_max</div><div class="ttdoc">Max of range of values. </div><div class="ttdef"><b>Definition:</b> Random.h:174</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_08235c883c2d11e586a63e6645937db5.html">Thirdparty</a></li><li class="navelem"><a class="el" href="dir_d1a1b6b9a428c17d660585cf3877a970.html">DBoW2</a></li><li class="navelem"><a class="el" href="dir_e9a4af7428d78393e998361510b02141.html">DUtils</a></li><li class="navelem"><a class="el" href="_random_8h.html">Random.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
